//
//  main.m
//  threads
//
//  Created by mars on 29/07/2013.
//  Copyright (c) 2013 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Target.h"

int main(int argc, const char * argv[])
{

    @autoreleasepool {
        Target *aTarget = [[Target alloc] init];
        NSString *str = @"hello, thread!";
        [NSThread detachNewThreadSelector:@selector(aSelector:) toTarget:aTarget withObject:str];
        
//        +detachDrawingThread:toTarget:withObject:
//        NSLock
//        NSConditionLock
        
        //        if ([drawView lockFocusIfCanDraw]) {
//        // set colors, use NSBezierPath and NSString drawing functions
//        [[drawView window] flushWindow];
//        [drawView unlockFocus];
//    }
        
//        -fobjc-exceptions -> @syncronized
//       NSThread - (NSMutableDictionary *) threadDictionary
        
        NSLog(@"thread started\n");
        
    }
    return 0;
}

